package com.alipay.app.groupmeal.standard.ui.b.function.amount;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

import androidx.annotation.Nullable;

import com.alipay.app.groupmeal.standard.R;
import com.alipay.app.groupmeal.standard.constant.BaseConstant;
import com.alipay.app.groupmeal.standard.constant.ConfigConstant;
import com.alipay.app.groupmeal.standard.widget.CustomFitViewTextView;
import com.alipay.app.groupmeal.standard.widget.business.BaseBScreenView;

/**
 * 待机页面固定金额
 */
public class BScreenFixedAmount extends BaseBScreenView {

    private CustomFitViewTextView tv_amount;

    public BScreenFixedAmount(Context context) {
        super(context);
    }

    public BScreenFixedAmount(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected int getLayoutId() {

        if (ConfigConstant.displayType == BaseConstant.DISPLAY_TYPE.T2) {
            return R.layout.view_fixed_amount_ft2;
        } else {
            return R.layout.view_fixed_amount;
        }

    }

    @Override
    protected void initView(View view) {
        tv_amount = findViewById(R.id.tv_amount);
    }

    @Override
    protected void initData() {

    }

    public void setFixedAmount(String amount) {
        tv_amount.setText(amount);
    }
}
